﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nop.Core.Domain.Hotel;
using System.Data.Entity.ModelConfiguration;

namespace Nop.Data.Mapping.Hotel
{
    public partial class RoomTypeLocalizedMap : EntityTypeConfiguration<RoomTypeLocalized>
    {
        public RoomTypeLocalizedMap()
        {
            this.ToTable("RoomTypeLocalized");
            this.HasKey(p => p.Id);
            this.Property(p => p.TypeName).IsRequired().HasMaxLength(100);
            this.Property(p => p.TypeDescription).IsMaxLength();
            this.Property(p => p.LanguageCode).IsRequired().HasMaxLength(10);

            this.HasRequired(pp => pp.RoomType)
               .WithMany(p => p.RoomTypeLocalized)
               .HasForeignKey(pp => pp.RoomTypeID);
        }
    }
}
